package com.ray.mybatisdemo.service.impl;

import com.ray.mybatisdemo.entity.User;
import com.ray.mybatisdemo.mapper.UserMapper;
import com.ray.mybatisdemo.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: Ray.Shaw <p />
 * Time: 2019/10/30 15:53  <p />
 * Version: V1.0  <p />
 * Description:  <p />
 */
@Slf4j
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectOne(Integer id) {
        return userMapper.selectOne(id);
    }

    @Override
    public List<User> getAll() {
        return userMapper.selectAll();
    }
}
